Program for controlling the movement of group of characters, recorded medium, and game device thereof

ABSTRACT

In a program for controlling a group of characters, a recorded medium, and a game device thereof, one can enjoy complex lively movement or fighting of the group having the leader in the middle by a self-explanatory operation, which is expressed more realistically. The present program provides a program for controlling video games, and controlling the movement of a character group to permit a computer to function to accomplish: a group movement function to move a leader-including group of which a leader character is added to an agent group comprising a plurality of agent characters in a 3-dimensional virtual space based on input information from an input device; a particular effect function to effect a particular force on each character every certain time in order to express the realistic movement of the character when moving the leader-including group; a position computing and storage function to calculate and memorize the latest position of each character based on the applied particular effects; and a group display function to display the leader-including group on a display device.

FIELD OF THE INVENTION

This invention relates to programs for controlling a group ofcharacters, a recorded medium, and a game device thereof, and moreparticularly to a program for controlling the group of characters,recorded medium, and game device thereof wherein a player can directlyoperate the group (troop) of the characters in a 3-dimensional virtualspace and wherein the movement and the battle of the group are shownwith reality.

BACKGROUND ART

In video games for home usage, there are some programs wherein theplayer controls, for moving in the 3-dimensional virtual space, both aleader character and an agent group (such as a troop, party, andplatoon) comprising agent characters who follow the leader.

Conventionally, there is disclosed a program for controlling themovement of the character group, wherein each character is moved to atarget site at a total acceleration in combination of, for each X-Y-Zcomponent in 3-dimensional virtual space, an acceleration to be awayfrom the other characters when the other characters exist in a firstrange and an acceleration to agree with the moving speed and thedirection of the other characters following the leader when the othercharacters exist in a second range. Thereby, each character can be movedwhile changing the speed and/or direction based on the moving state ofthe other characters in the first or second range, which shows realisticmovement of each character.

Also, there is disclosed a program for controlling the movement of thecharacter group, wherein a plurality of game characters are moved todisperse from a certain game character or a certain first range when anybuttons (first to fourth buttons) on an input device are not pressed toinstruct the direction, and the game characters are moved to assembleadjacently to the certain game character or a second range when thefirst button is pressed. Thereby, in the 3D virtual space, pressing thefirst button, just a single button, gives instructions for bothdirection and start for movement at the same time to the game charactersmoving in the different directions toward the certain game character orthe second range after dispersing from the game character or the firstrange. Operationality for the movement of the plural game characters isimproved while reducing the burden on a signal processing section. Also,by setting such that the plural game characters are moved as a group ina direction designated by pressing any one of the second to fourthbuttons, the second to fourth buttons can be utilized to instruct thenormal direction while moving the group without indicating the group.This improves the operationality of the movement of the group, inaddition to the above-mentioned dispersion and the assembly. Further,when the input device includes a cross-like button set in which thefirst button is allocated to a down button, the second to fourth buttonsare allocated to up, left, right buttons respectively, it is easy forthe player to understand that the down button is a button to assemblethe certain game characters, with the other up, right, and left buttonsbeing utilized to instruct actual normal directions. Because theparticular game character represents the player himself, pressing of thedown button of the cross-like button set corresponds to the feeling forthe assembly to the player in view of the position of the button.

Further, there is disclosed a program for controlling the movement ofthe character group, wherein the computer functions as: a model dataproviding means to supply motion data for non-displayed 3D polygon modelthat operates in the 3D virtual space; a motion ability providing meansto provide the character following the top of the 3D polygon model withthe motion ability; and a position calculation means to calculate theposition of the characters in the 3D virtual space. Thereby, the pluralcharacters forming the group are provided with the motion ability tofollow the top of the non-displayed 3D polygon models, which eliminatesthe need to prepare the motion for each character, simplifying theprocess. This also serves to express the group of the character in acomplex formation, as if a single moving organism.

Examples of relevant patent documents include JP No. 3163496, JPLaid-Open No. 2002-66131, and JP Laid-Open No. 2004-62676.

SUMMARY OF THE INVENTION

Conventionally, when controlling the motion of the character groupaccording to the patent documents JP No. 3163496 and JP Laid-Open No.2004-62676, the group (troop or platoon) is not operated to move by theplayer but automatically by the computer. It is suitable to enjoywatching the battle, but is not suitable for the enjoyment of beingdirectly involved in the operation and battle of the group, which isinconvenient.

Also, according to the invention disclosed in JP No. 3163496, eachcharacter in the group follows the leader while maintaining a distancebetween each other, but while changing speed and direction. Thisexpresses realistic movement since there is passing of the character andchanging of the relative position thereof in the group. Due to the lackof the idea of a barycenter, the characters in the back (rear) of thegroup may however disperse to a certain extent in some cases, andtherefore the whole group is not displayed on the screen. In contrast,the invention according to the patent document JP Laid-Open No.2004-62676 avoids the large dispersal of the characters and maintainsthe formation of the group owing to the characters following the top ofthe whole non-displayed polygon models. However, each character isprovided with a fundamental alignment position in the group (i.e., thetop of own character to be a target site for movement), so that theposition in the group does not change basically, which is not a variablelively or life-like movement.

Further, according to the invention of the patent document JP Laid-OpenNo. 2002-66131, the group can be operated directly by the cross-likebutton set. However, this invention succeeds the invention of JP No.3163496 in which the characters follow the leader, and therefore theoperation of the whole group is limited to only, e.g., forward or stop.This is because, due to the lack of the idea of the barycenter, thereare the problems of the dispersion of the character while moving and ofthe non-display of the whole group. It is also difficult to grasp thedispersed characters on the program process in the course of battle,especially in the confusion of a close fight in the final stage, so thatexternal operation of the group is no longer easy.

The present invention provides a program to control video games, whereina computer functions as: a group movement means to move aleader-including group of which a leader character is added to an agentgroup comprising a plurality of agent characters in a 3-dimensionalvirtual space based on input information from an input device; aparticular effect means to effect a particular force on each characterevery certain time in order to express the realistic movement of thecharacter when moving the leader-including group; a position computingand storage means to calculate and memorize the latest position of eachcharacter based on the applied particular effects; and a group displaymeans to display the leader-including group on a display device. Also,the present invention provides a program to control video games, whereina computer functions as: a group movement and combat means to move andfight a leader-including group of which a leader character is added toan agent group comprising a plurality of agent characters in a3-dimensional virtual space based on input information from an inputdevice; a front-line forming means to form the front-line of theleader-including group so as not to pass an enemy group in the battle ofthe leader-including group against the enemy group; and a friendly andenemy groups display means to display the leader-including and the enemygroups on a display device.

According to the present invention that provides the program forcontrolling the movement of group of characters, recorded medium, andgame device thereof, the invention serves to show the whole groupwithout substantially disturbing the formation of the group and toappropriately express the character's behavior such as passing orchanging the position of the character in the group. Accordingly, onecan enjoy complex lively movement or fighting of the group having theleader in the middle by a self-explanatory operation, which is expressedmore realistically.

By the player that directly operates the group, the invention achievesthe object wherein one can enjoy complex lively movement or fighting ofthe group having the leader in the middle by a self-explanatoryoperation.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the present invention will now be described in detailwith reference to the drawings.

FIG. 1 is a flowchart of a program for controlling the character group.

FIG. 2 is a flowchart for a sub-routine to process the movement andbattle of the group.

FIG. 3 is a flowchart for a sub-routine to process the agent characterin FIG. 2.

FIG. 4 is a flowchart for a sub-routine to process a state of the agentcharacter in FIG. 3.

FIG. 5 is a flowchart for a sub-routine to process the barycenter inFIG. 3.

FIG. 6 is a flowchart for a sub-routine to process the platoon in FIG.2.

FIG. 7 is a flowchart for a sub-routine to process traveling speed ofthe platoon in FIG. 6.

FIG. 8 is a diagram of the repulsive force effected on the character.

FIG. 9 is a diagram of the relationship between the repulsive forceeffected on the character and the distance.

FIG. 10 is a diagram of the cohesive force effected on the character.

FIG. 11 is a diagram of the moving force effected on the character.

FIG. 12 is a diagram wherein the leader character is at the vanguard ofthe group.

FIG. 13 is a diagram wherein the leader character is positionedgenerally in the middle of the screen.

FIG. 14(A) is a diagram of the force effected on the character.

FIG. 14(B) is a diagram to show the movement of the character.

FIG. 15 is a diagram to show the movement of the vanguard soldiers inthe course of the battle in the front line.

FIG. 16 is a diagram to show the rearguard soldiers standing by to coverthe vanguard soldiers.

FIG. 17 is a diagram to show the friendly agent group shifting to theassist state.

FIG. 18 is a diagram to show the arrangement of the agent characterswhen attacking.

FIG. 19 is a diagram to show the movement of the rearguard soldiers.

FIG. 20 is a diagram to show the movement of the rearguard soldiersafter the virtual borderline is established.

FIG. 21 is a block diagram of the game device.

FIG. 22 is a plan view of the input device.

FIG. 23 is a front view of the input device taking along line of anarrow XXIII in FIG. 22.

FIG. 24 is a control block diagram of the game device.

DETAILED DESCRIPTION

FIGS. 1-24 illustrate an embodiment of the present invention.

FIG. 21 shows a video game device 2 for home usage (hereinafter referredto as “game device”).

The game device 2 includes a game device main body 4 to which atelevision monitor 8, with a speaker 6 built therein, and an inputdevice 10 are connected. The game device main body 4 includes a mediareading section 14 (see FIG. 24) by which a recorded medium 12, such asCD-ROM and DVD, can be loaded/unloaded. When attaching the recordedmedia 12 to the media reading section 14, stored game programs or gamedata are automatically loaded into a memory (RAM) in the main body 4.The television monitor 8 displays, for example, the groups (troops) ofthe game based on information from the input device 10. By the inputdevice 10, the groups can be moved in the game.

As shown in FIGS. 22 and 23, a main body 16 of the input device 10, asan operational section, includes many buttons such as: a start button 18to start the game; a square-marked button 20, a triangle-marked button22, a circle-marked button 24, and an X-marked button 26, which areutilized to, for example, operate game characters and respond to thequestionnaire that the game device main body 4 issued; a cross-likedirection button set 36 formed by an upward button 28, a rightwardbutton 30, a leftward button 32, and a downward button 34; a selectbutton 38; R1 and R2 buttons 40, 42; L1 and L2 buttons 44, 46; right andleft analogue sticks 48, 50; and an analogue mode switch 52. The leftanalogue stick 50 is allocated for instructing the direction in whichthe group should move. The square-marked button 20 is allocated toattacking of the character, such as raising a sword overhead.

Referring to FIG. 24, the main body 4 of the game device includes a CPUblock 54 to control the whole system of the device as a computer toexecute programs for video games. The CPU block 54 includes: an SCU(System control unit) 56 to control mainly the data transfer betweenrespective sections of the main body 4; a CPU (Central Processing Unit)58 that operates at high clock speed; a ROM (Read Only Memory) 60 thatstores the basic operation of the main body 4 of the game device; a RAM(Random Access Memory) 62 that functions as a working area for the CPU58 and temporarily stores the game programs recorded by the recordedmedium 12 and various data; and an internal bus 64 connecting theseelements.

Also, the SCU 56 is connected to an outer bus 66. The outer bus 66includes: a receiving section 68 that receives an input from the inputdevice 10 and provides the input information to the CPU block 54; themedia reading section 14 that reads the game programs recorded on therecorded medium 12 such as CD-ROM, and transfers to the CPU block 54,the media reading section 14 including a sub-CPU (not shown); an imageprocessing section 70, equipped with a CPU for graphics and a VRAM, thatperforms a light source process based on information from the CPU block54 to draw in the 3-dimensional field; and a sound processing section72, equipped with a sub-CPU (not shown), that processes the sound suchas background music and battle sound. In addition, the receiving section68 is connected to the input device 10. The image processing section 70is connected to the television monitor 8. The sound processing section72 is connected to the speaker 6 built in the television monitor 8.

Here, according to the program of the embodiment to operate the videogame, the CPU block 54, or a computer, functions as: a group movementmeans to move a leader-including group of which a leader character isadded to an agent group (troop, platoon and the like) comprising aplurality of agent characters in the 3-dimensional virtual space basedon input information from the input device 10; a particular force effectmeans to effect a particular force on each character every certain timein order to express the realistic movement of the character when movingthe leader-including group; a position computing and storage means tocalculate and memorize the latest position of the character based on theapplied particular effects; and a group display means to display theleader-including group on the display device, namely the televisionmonitor 8.

The particular force includes three forces (1)-(3) as follows: (1) arepulsive force to avoid a collision with the other characters (force ina direction of dispersion); (2) a cohesive force to effect the agentgroup toward the barycenter (force to be together); and 3) a movingforce to move the character in a designated direction selected by theoperation section of the input device 10 or by the program.

Next, according to the program of the embodiment to operate the videogame, the CPU block 54, or the computer, further functions as a leadermovement means to move the leader character to the barycenter of theagent group.

The recorded medium 12 has the recorded program that permits the gamedevice 2 to function as the group movement means, the particular forceeffect means, the position computing and store means, the group displaymeans, and the leader movement means.

The game device 2 to operate the video game of the embodiment includes:the group movement means to move a leader-including group of which theleader character is added to the agent group comprising a plurality ofthe agent characters in the 3-dimensional virtual space based on inputinformation from the input device 10; the particular force effect meansto effect the particular force on each character every certain time inorder to express the realistic movement of the character when moving theleader-including group; the position computing and storage means tocalculate and memorize the latest position of the character based on theapplied particular effects; the group display means to display theleader-including group on the television monitor 8, i.e. the displaydevice; and the leader movement means to move the leader character tothe barycenter of the agent group.

Next, according to the program of the embodiment to operate the videogame, the CPU block 54, or the computer, further functions as: a groupbattle movement means to move, to an enemy area for a battle, theleader-including group of which the leader character is added to theagent group comprising a plurality of the agent characters in the3-dimensional virtual space based on input information from the inputdevice 10; a front line forming means to form the front line of theleader-including group to avoid breaking (mixture) of the enemy group inthe course of the battle against the enemy group; and a friend and enemygroups display means to display the leader-including group and the enemygroup on the television monitor 8, i.e. the display device.

Next, according to the program of the embodiment to operate the videogame, the CPU block 54, or the computer, further functions as a friendlyagent movement means to move the friendly agent who is not fightingbased on information from the input device 10 after the leader-includinggroup is piercing the enemy group.

According to the program of the embodiment to operate the video game,the CPU block 54, or the computer, further functions as a friendly agentmove-around means to automatically move the friendly agent who is notfighting to surround behind the enemy group when the friendly agent (orgroup) who is not fighting goes beyond a set virtual border line at theback (behind) of the enemy group.

According to the program of the embodiment to operate the video game,the CPU block 54, or the computer, further functions as a reconnoitermeans to enable the leader character to search for the enemy as in theother friendly agent character in the course of battle of theleader-included group.

The recorded medium 12 has the recorded program that permits the gamedevice 2 to function as, in addition to the above-mentioned functions,the group battle movement means, the front line forming means, thefriend and enemy groups display means, the friendly agent movementmeans, the friendly agent move-around means, and the reconnoiter means.

Next, to operate the video game of the embodiment, the game device 2includes: the group battle movement means to move, to the enemy area fora battle, the leader-including group of which the leader character isadded to the agent group comprising a plurality of the agent charactersin the 3-dimensional virtual space based on input information from theinput device 10; the front line forming means to form the front line ofthe leader-including group to avoid breaking (mixture) of the enemygroup in the course of the battle against the enemy group; the friendlyagent movement means to move the friendly agent who is not fightingafter the leader-including group is piercing the enemy group; thefriendly agent move-around means to automatically move the friendlyagent who is not fighting to surround behind the enemy group when thefriendly agent who is not fighting goes beyond a set virtual border lineat the back of the enemy group; and the friend and enemy groups displaymeans to display the leader-including group and the enemy group on thetelevision monitor 8, i.e. the display device.

As thus described, according to the embodiment of the present invention,the program for controlling the video game permits the CPU block 54, orthe computer, to function as: the group movement means to move theleader-including group of which the leader character is added to theagent group comprising a plurality of the agent characters in the3-dimensional virtual space based on input information from the inputdevice 10; the particular force effect means to effect the particularforce on each character every certain time in order to express therealistic movement of the character when moving the leader-includinggroup; the position computing and storage means to calculate andmemorize the latest position of the character based on the appliedparticular effects; and the group display means to display theleader-including group on the television monitor 8, i.e. the displaydevice. Alternatively, in addition to those functions, the programpermits the computer to function as the leader movement means to movethe leader character to the barycenter of the agent group. Thereby, onthe move of the leader-including group, the particular forces, i.e.,repulsive, cohesive, and moving forces, are applied so that the movementof every character is displayed realistically every certain time(frames).

Here, the certain time (frame) is defined by a unit of time for imageprocess. In the embodiment, the time for one frame corresponds to thetime for two vertical retrace interruptions (Vsync), 1/30 sec, whichVsync is recalled on the program at intervals of 1/60 sec (16.6 msec) inaccordance with a vertical retrace cycle of the television monitor 8.

In the (1) repulsive force, as shown in FIG. 8, the repulsive force ofan agent character A, for example, is produced against the other agentcharacters within an area of some, e.g., 3-meter radius having the agentcharacter A at the center. This repulsive force is produced separatelyfor each agent character.

In this case, it is assumed that a position of the agent character isdesignated as “a”, a position of the other agent character is “b”, alimit range to produce the repulsive force (the maximum distance atwhich the repulsive force is produced and is no longer produced beyondthis limit) is “d”, and the extent of the maximum repulsive force is“f”.1=|a−b|  [Equation 1]v=(a−b)/1Repulsive force=v*f*max(d− 1, 0)/dWherein “v” is a unit vector directing from “a” to “b”, that has onlydirection; its quantity being 1. The expression “f*max(d−1, 0)/d” isillustrated in FIG. 9. Here the expression “|a−b|” is the absolute valueof “(a−b)”. The expression “max(d−1, 0)” is intended to choose thelarger value of either “(d−1)” or “(0)”. The relationship between therepulsive force and the distance may be changed at a certain ratio asshown in FIG. 9, although it may be changed so that the repulsive forcebecomes steeply larger with decreases in distance, such as quadraticfunction.

In the (2) cohesive force, as shown in FIG. 10, the barycenter of thegroup mentioned herein is the so-called barycenter of particles, whichutilizes coordinates wherein coordinates of horizontal components (x andz) of each agent character are added and averaged for each component.The vertical component (y) is set at the ground level. The barycenterdoes not always agree with a center of a simple rectangular or circularouter frame including each agent character. Simply, the barycenter maybe set at the center of the simple outer frame. However, it is desirablethat, when there is a character apart from the gathering group, thebarycenter of the group should be at the gathering portion, so that theoriginal idea of barycenter should be adopted.

It is assumed that the position of the agent character A is designated“a”, the barycenter of the group is “c”, and the magnitude of a maximumcohesive force is “f”.v=(c−a)/|c−a|  [Equation 2]Cohesive force=v*f

In the (3) moving force, as shown in FIG. 11, when the left analoguestick 50 on the input device 10 is tilted in a forward left slantingdirection to instruct the direction, the equation is stated as follows,wherein the current velocity of the agent character is designated “v0”,a designated moving velocity is “v1”, the time to require to change fromv0 to v1 is “dt”, and a maximum acceleration that can be produced is“acc”.v=(v1−v0)/dt  [Equation 3]Moving force=v/v|*min(|v|, acc)Wherein, “v/|v|” is a unit vector. Expression “V” designatesacceleration. Expression “min(|v|, acc)” is intended to limit theacceleration “v” below the maximum acceleration “acc”.

Here, when calculating the equation of motion “F=m*α (wherein “F” isforce, “m” is mass, and “α” is acceleration)”, the present embodimentregards the mass “m” as 1 and the force as being equal to acceleration,in the 3-dimensional virtual space of the embodiment.

For the forces (1)-(3), i.e., acceleration speed is calculated for eachcoordinate component (x, y, z) and, by adding these for each coordinatecomponent, the total acceleration speed is calculated. Then by utilizingan equation 4 described below, the latest speed and position of eachcharacter are computed and the results are stored in RAM 62.Predetermined are an initial speed before the movement of the characters(i.e., zero), a designated moving speed (the (3) moving force, v1), andthe position (coordinate value in an aligned state).

By applying the velocity V0 and the position P0 just before the currenttotal acceleration α is obtained (the immediately preceding frame) tothe below equation 4 indicating equation of motion with Euler's formula,the current velocity V1 and position of the agent character arecalculated for each component (x, y, and z).

Incidentally, in the equation 4, Δt designates a time ( 1/30 sec)between the previous frame and the current frame, with the previousvelocity V0 and position P0 being stored in RAM 62.V1=V0+α/Δt  [Equation 4]P1=P0+V0*Δt+0.5*α*Δt2

Based on the latest position P1 obtained from the above equation 4 foreach character, the agent character is drawn on the screen.

Thus, the (1) repulsive force and the (2) cohesive force arecounteracting, so that the forces (1)-(3) vary in every frame. Slightsway of the barycenter effects on the (2) cohesive force. This serves toexpress the group swaying or lively slight movement.

Next, according to the program of the embodiment to operate the videogame, the CPU block 54, or the computer, further functions as the leadermovement means to move the leader character to the barycenter of theagent group.

Referring to FIG. 12, the whole of the agent group with the leader atthe vanguard is not shown or displayed in some cases. Also, assumingthat the leader character is leading to move the agent group, it may berealistic when the leader is commanding at the center of the group withthe soldiers guarding around him, instead of commanding at the vanguard.

Therefore, in the embodiment as shown in FIG. 13, the barycenter is setfor the whole of the agent group, and the position and direction of thecamera is set automatically so that the barycenter is at the center ofthe display. The (2) cohesive force is effected so that the position ofthe leader character is in agreement with the barycenter. Special force(the force that brings the leader toward the barycenter) is effected onthe leader character.

Although the initial position of each agent character of the group ispreset so that the group establishes, e.g., a rectangular formation, thespecific position of the agent character is determined and displayedonce the movement begins due to the three forces variably effecting inevery frame. Therefore the whole shape of the agent group and therelative position and the sequence of the characters are variable as inthe real troops, thereby representing a lively movement.

At this time, the character at the vanguard of the agent group is notthe leader and is effected by the force toward the leader at thebarycenter of the group (i.e., (2) cohesive force).

In addition to the three forces, the leader character is effected by aforce described below in each frame. Total acceleration is computed inaddition to the three forces, and the latest speed and position arecalculated by using the equation 4 of Euler's formula and then memorizedin the RAM.

More particularly, in the force which brings the leader character towardthe barycenter of the troop, it is assumed that the position of theagent character (here, the leader) is designated “p”, the currentvelocity of the agent character is “v0”, the maximum acceleration is“acc”, the position of the barycenter of the platoon is “c”, thetraveling velocity to the barycenter of the platoon is “v1”, and therelative speed in gaining access to the barycenter of the platoon (thespeed of the agent character viewed from the barycenter of the platoon)is “f(1)”.f(1):v* 1/d, when 0≦1<df(1): v, when d<1Here, expression “v” is the maximum relative speed, “d” is the distanceto start deceleration of the access speed, and “1” is the distancebetween the agent character and the barycenter of the platoon.

It is assumed that “dt” is a time until the relative speed reaches f(1).v2=v0−v1  [Equation 6]1=|c−p|v3=(c−p)/1v4=((v3*f(1))−v2)/dtForce to bring toward the barycenter of platoon=v4/|v4|*min(|v4|, acc)

In the above-mentioned equation, as shown in FIGS. 14(A) and 14(B), whenthe agent character “x” moving in the direction “v” at the velocity of“v” is effected by the force in the direction “v” at the velocity of“v′”, the agent character can be moved in the direction “v′” in asituation where the force in the direction “v′−v” is applied. Here,equation “(v′−v)/dt=α” relates to the acceleration speed, that is theforce to bring toward the barycenter having mass of 1. This accelerationspeed a does not point to the barycenter (direction “v′−v”; “v′” is thedirection to the barycenter). This is different from the (2) cohesiveforce (acceleration speed) that directs toward the barycenter.

However, at this stage, the direction of the agent character has notbeen considered (added) yet; the agent character is handled as aparticle having no-direction. This is because, due to the fact that theagent character has a certain direction, the sudden changes of the agentcharacter in the opposite direction may result in non-realisticmovement. The changes of the direction must be shown gradually.

For this, the present embodiment provides a particle control having adirection in which a particle control of the agent character with theaddition of a direction control so as to change the direction of theagent character in each frame. Regarding this, the well-known method(for example, JP Laid-Open 2004-6267) enables the agent character torotate to a traveling direction.

As shown in FIGS. 15 and 16, in the course of combat of the agent group,both of the (3) moving force to move forward (see FIG. 11) and the (1)repulsive force effected by a vanguard soldier of the enemy group areapplied to the group. In this situation, both the repulsive and movingforces cause the group to be in a flat formation to gradually expandright and left, particularly the rearguard soldiers are dispersing. Onthis account, the expansion or dispersion is avoided by applying the (2)cohesive force, the force toward the barycenter of the group, to thecharacters. In addition, the vanguard soldier fighting in the front lineis processed, given a battle process on a higher priority, so that theright and left movements of the (3) moving force are prevented (thesoldiers are not moved right and left even if the right analogue stick50 is operated sidewardly).

Next, according to the program of the embodiment to operate the videogame, the CPU block 54, or the computer, functions as: a group battlemovement means to move, to an enemy area for a battle, theleader-including group of which the leader character is added to theagent group (troop, unit and the like) comprising a plurality of agentcharacters in the 3-dimensional virtual space based on input informationfrom the input device 10; a front line forming means to form the frontline of the leader-including group to avoid breaking (mixture) of theenemy group in the course of the battle against the enemy group; and afriend and enemy groups display means to display the leader-includinggroup and the enemy group on the television monitor 8, the displaydevice.

As shown in FIG. 17, a first character searches for the other agentcharacters within a certain radius (e.g., 5 m) and within a certainangel view θ (e.g., 90 degrees).

Then, if the other agent character nearest to the first character is theenemy agent, the first character is shifted to a battle state. If notand if the other agent character front and nearest to the firstcharacter is the friendly agent character, it is shifted to an assistingstate. If not, the first character remains to move since there are noother agent characters before him.

Here, the above-mentioned assisting state in this embodiment is a statewhere the first character is standing by to avoid the enemy agentcharacter to pierce into the friendly agent group, although there may beanother method to increase variables of attacking or defense power ofthe fighting vanguard character in the front line.

On the process of the program, whether each character is fighting or notis determined by referring to state variables that indicate battle,assist, or moving state and are updated at anytime and stored in the RAM62.

Consequently, the group forms the front-line as described below. In thisway, a process of which local control is provided with each agentcharacter but eventually forms the total formation, is generally called“creative and developing control”. The purpose of this process thatforms the front line is to prevent melee or assault at close quarters.

After the battle begins, there may be caused a close fight where bothfriend and enemy groups mix or confuse. The player cannot grasp whichgroup the player is operating, even if the process has been realized tooperate the group before mixing. It is hard to see the originalformation of the group.

In contrast, formation of the group is clearly visualized or maintainedby a process of which, in the course of the battle, the vanguardsoldiers form the front line and then rearguard soldiers behind thevanguard soldiers move to cover them.

Pressing the attack button (e.g., the square-marked button 20) allowsattacking of only the front vanguard soldiers of the group beingpresently operated by the player and shows motion of the characters,such as swinging down the sword.

More particularly, when the square-marked button 20 is depressed, theagent character who does not face the friendly agent character swingsdown the sword, regardless of whether facing the enemy character or not.The soldiers in a first row do not necessarily swing down the sword.This is illustrated in FIG. 18.

Next, according to the program of the embodiment to operate the videogame, the CPU block 54, or the computer, further functions as a friendlyagent movement means to move the friendly agent who is not fightingbased on information from the input device 10 after the leader-includinggroup pierces the enemy group; and a friendly agent move-around means toautomatically move the friendly agent who is not fighting to surroundbehind the enemy group when the friendly agent who is not fighting goesbeyond a set virtual border line at the back (behind) of the enemygroup.

More particularly, in FIG. 19, a right-arrow (a) and up-arrow (b) showthe directions of the forces effected onto the rearguard soldiers, i.e.moving directions, when the left analogue stick 50 is tilted towardright and up in turn (alternatively the cross-shaped button set 36 isdepressed rightward and upward in turn).

As shown in FIG. 20, after the left analogue stick 50 is tilted in thedirections (a) and (b), the left analogue stick 50 should be tilteddownwardly in a usual way. However, requirement of this downwardoperation also results in the undesirable downward movement of the grouppresently fighting (i.e., retreat).

At this time, the group main body should not be moved, so that, whilethe downward operation of the left analogue stick 50 is still allocatedto downwardly move the group main body, the move-around of the rearguardsoldier is realized without the need for the downward operation of theleft analogue stick 50. In particular, the virtual borderline isappropriately provided at the back or through the enemy group. After therearguard soldiers move beyond the virtual boarder line by operation ofthe left analogue stick 50 in the direction (b), the rearguard soldiersautomatically move-around behind or to the side of the enemy group andthen move toward the barycenter of the enemy group (subsequently battleoccurs).

The virtual boarder line is, for example, a straight line which isperpendicular to a line connecting the barycenters of the enemy andfriendly agent groups and which passes the aftermost of the enemy group,with respect to the friendly agent group or which passes the barycenterof the enemy group instead of the aftermost of the enemy group. Otherlines such as a line behind the enemy group or a line passing inside ofthe group or even a curved line may be utilized as long as automaticmove-around can be started to the extent a certain attack can beachieved.

Also, the other methods to prevent dispersion of the agent character mayinclude a process to avoid movement beyond a virtual frame of the group,for example. However it is difficult for this method to move (moveround) only a part of the group not fighting.

Therefore, according to the program of the embodiment to operate thevideo game, the CPU block 54, or a computer, further functions as afriendly agent move-around means to automatically move the friendlyagent who is not fighting to surround behind the enemy group when thefriendly agent who is not fighting goes beyond an assumed virtual borderline at the back (behind) of the enemy group. With regard to the forceto move behind the enemy group, the above-mentioned equation 5 andequation 6 effected on the leader character are applied to the agentcharacters, while replacing the barycenter of the platoon by that of theenemy platoon, that is “the force to move the respective agent towardthe barycenter of the enemy platoon”.

Operation of the game device 2 of the embodiment is explained withreference to flowcharts of FIGS. 1-7 as to a battle with the enemy groupbeing commanded by the computer (the CPU block 54) after movement of thegroup of the player (friendly group; leader-included group).

The game program and the game data recorded on the medium 12 have beenalready installed into the RAM 62 of the CPU block 54 of the main body 4of the game device, having an initial setting already done. For the sakeof simplicity, operation of the group of the player is mainly explained,and explanation of the group of the computer, to which is applied thesimilar process, is omitted.

Now referring to FIG. 1 which shows a flowchart, a program starts instep 102, followed by an initial setting in step 104. In the initialsetting in step 104, coordinates of each platoon, in a move/halt state,are set. For all of the agent characters, the various data are loadedsuch as the velocity and the acceleration set at zero, in a northerndirection (for example), in the move/halt state, and those polygon data.The move/halt state is a state wherein either the character is moving orstaying.

After the initial setting, a determination is made in step 106 as towhether an interruption is caused. In this embodiment, a time intervalfor this is set at a time for one frame that corresponds to twointerruptions of Vsync as described above.

If the determination in step 106 is “NO”, a main process is executed instep 108.

In this step 108, for example, information for the tilting operation bythe left analogue stick 50 that is received and transferred by the inputreceiving section 68, is temporarily stored and updated in the RAM 62.In this step 108, other processes are also executed, such as the processas to pressing of other buttons or the sound process to permit the soundprocessing section 72 to synthesize for a game sound effect.

If the determination in step 106 is “YES”, then a sub-routine isexecuted in step 110 for the group movement and battle process.

After the main process in step 108 or the sub-routine for the groupmovement and battle process in step 110, a determination is made in step112 as to whether a finish button of the input device 10 is pressed. Ifthis determination in step 112 is “NO”, the program returns to step 106.If the determination in step 112 is “YES”, the program ends in step 114.

The sub-routine for the group movement and battle process in step 110 inFIG. 1 is illustrated by a flowchart in FIG. 2. One platoon-statevariable is prepared for each platoon, and one agent-state variable isprepared for each agent character in the RAM 62.

As shown in the flowchart in FIG. 2, a program starts in step 202. Atfirst, a determination is made in step 204 as to whether the process isfinished for all of the platoons.

If the determination in step 204 is “NO”, a sub-routine for the agent isexecuted in step 206. Then a sub-routine for the platoon is executed instep 208 and then the program reverts to step 204.

If the determination in step 204 is “YES”, a process for full-screendisplay is executed in step 210 for the character which is able todisplay within the screen frame. Then the program returns in step 212.

The sub-routine for the agent character in step 206 of FIG. 2 isillustrated by a flowchart shown in FIG. 3. A program starts in step302, followed by a determination in step 304 as to-whether the processis finished for all the agent characters.

If the determination in step 304 is “NO”, then a sub-routine to processfor a state of the agent character is executed in step 306. Then the (1)repulsive force is calculated in step 308, and the (2) cohesive force iscalculated in step 310. In step 312, a determination is made as towhether the agent character is fighting or not.

If the determination in step 312 is “NO”, then another determination ismade in step 314 as to whether the player is operating or instructingthe platoon. If this determination in step 314 is “YES”, then a movingspeed for the agent character is set based on a value of the tilt of theleft analogue stick 50 in step 316.

If the determination in step 314 is “NO”, then the traveling speed forthe agent character is set based on the traveling speed of the platoonin step 318.

After the traveling speed of the agent character is set in step 316 or318, the (3) moving force is computed in step 320.

After the calculation of the moving force in step 320, a sub-routine forthe barycenter process is executed in step 322. Then the totalacceleration speed is calculated in step 324, and the latest speed andposition of each character are computed and stored in RAM in step 326,and orientation of the character body is performed in step 328. Theprogram then returns to step 304.

If the determination in step 312 is “YES”, that is the agent characteris fighting, then a process for the battle of the agent character isexecuted in step 330. Here, various process are executed, such as aprocess to start fighting of only the agent character in the battle whenthe square-marked button 20 is depressed, a process to deal with thedamage of the enemy character or the damage of the agent character givenby the enemy character, and a process for defense. Then the totalacceleration speed is calculated in step 324.

If the determination in step 304 is “YES”, the program returns in step332.

As to the sub-routine for the process of the state of agent character instep 306 of FIG. 3, a variable of the state of the agent is changed asshown in FIG. 4.

As shown in the flowchart in FIG. 4, a program starts in step 402.Firstly, the agent character searches for the other agent charactersfront and nearest to him in step 404. A determination is made in step406 as to whether the enemy group (enemy agent character) is found.

If the determination in step 406 is “NO”, then another determination ismade in step 408 as to whether the friendly agent group is found.

If the determination in step 408 is “YES”, then further determination ismade in step 410 as to whether the platoon of the agent character is inthe battle or not.

If this determination in step 410 is “YES”, the agent character is setto the state for standing by for help in step 412.

If the determination in step 408 is “NO” or the determination in step410 is “NO”, then the agent character is set to the move/halt state instep 414 since there are no agent characters before him.

If the determination in step 406 is “YES”, then the agent character isset to a battle state in step 416.

After the processes in the steps 412, 414, and 416, the program returnsin step 418.

As shown in the flowchart in FIG. 5, a program starts in step 502 as tothe process for the barycenter in step 322 in FIG. 3. A determination ismade in step 504 as to whether the character to be processed is theleader character.

If the determination in step 504 is “YES”, then a force to bring towardthe barycenter of the friendly platoon (friendly agent group) iscalculated in step 506. This force is obtained from the equation 5 andequation 6, and is different from the (2) cohesive force.

If the determination in step 504 is “NO”, then another determination ismade in step 508 as to whether the position of the agent character isbeyond the virtual border.

If this determination in step 508 is “YES”, then a force to bring towardthe barycenter of the enemy platoon (enemy group) is calculated in step510. This force is also calculated by utilizing the equations 5 and 6.

The program returns in step 512 after the calculation of the force tobring toward the barycenter of the friendly platoon in step 506, or thecalculation to bring toward the barycenter of the enemy platoon (enemyagent group) in step 510, or if the determination in step 508 is “NO”.

The sub-routine for the platoon in step 208 of FIG. 2 includes amodification of the platoon state value as shown in a flowchart of FIG.6.

As shown in the flowchart in FIG. 6, a program starts in step 602.Firstly, the coordinates of the barycenter of the friendly platoon arecalculated in step 604. A determination is made in step 606 as towhether all the agent charters are in a non-battle state.

If the determination in step 606 is “NO”, then another determination ismade in step 608 as to whether the agent character is fighting. If thisdetermination in step 608 is “NO”, then the program returns to step 606.

If the determination in step 608 is “YES”, then the platoon is shiftedto the battle state in step 610 and the virtual borderline for themoving-round is set in step 612.

If the determination in step 606 is “YES”, then the platoon is shiftedto the move/halt state in step 614. Here, this move/halt state occurswhen there are no fighting agent characters.

After the setting of the virtual border for moving-round in step 612 orthe platoon is shifted to the move/halt state in step 614, a sub-routinefor the platoon traveling speed process is executed in step 616, and theprogram returns in step 618.

In the flowchart in FIG. 6, when any one of the agent characters arefighting, the state variable of the platoon to which the agent characterbelongs is shifted to the battle state, and then the border formoving-round to surround the enemy platoon (enemy group) is set andrestored. If there are no fighting agent characters, the state variableof the platoon is changed to the move/halt state.

As to the sub-routine for the platoon traveling speed process in step606 in FIG. 6, a program starts in step 702 as shown in a flowchart ofFIG. 7. Firstly, the process to search for the other enemy platoon frontand nearest to the friendly platoon (friendly agent group) is executedin step 704. A determination is made in step 706 as to whether the enemyplatoon is found.

If the determination in step 706 is “NO”, then another determination ismade in step 708 as to whether the friendly platoon is found.

If this determination in step 708 is “YES”, then further determinationis made in step 710 as to whether this friendly platoon is fighting ornot.

If this determination in step 710 is “YES”, then another determinationis made in step 712 as to whether the enemy platoon goes beyond thevirtual border line.

If this determination in step 712 is “YES”, then a traveling speed tomove toward the barycenter of the enemy platoon is set in step 714 (forthe moving-round).

If the determination in step 706 is “YES”, then the traveling speed anddirection to gain access to the enemy platoon are set in step 716.

If the determination in step 708 is “NO”, then the traveling speed anddirection for deceleration and stoppage are set in step 718.

If the determination in step 710 is “NO”, then the traveling speed anddirection to follow the friendly platoon are set in step 720.

If the determination in step 712 is “NO”, then the traveling speed anddirection toward the vicinity of the enemy platoon are set in step 722.The vicinity of the enemy platoon is, for example, at 5 meter on theborder line from the agent character at the right end of the enemyplatoon.

The program returns in step 724 after the processes in steps 714-722.

As thus described, according to the present invention that provides theprogram for controlling the movement of a group of characters, recordedmedium, and game device thereof, achieves to show the whole groupwithout substantially disturbing the formation of the group and toappropriately express the character's behavior such as passing orchanging position of the character in the group. Accordingly, one canenjoy complex lively or life-like movement or fighting of the grouphaving the leader in the middle by a self-explanatory operation, whichis expressed more realistically.

As a result, in this embodiment, the leader-including group (troop) canbe directly operated by manipulation of the input device 10 at thebeginning of the movement or when moving the group. The manipulation ofthe input device 10 is to tilt the left analogue stick 50 or to pressthe cross-shaped button set 36 so as to input the traveling direction.This achieves the expression of the realistic movement of theleader-included group (troop; such as horse-soldiers). On each characterof the group on the move, the above-mentioned three forces (repulsive,cohesive, moving forces) are effected, and latest position of eachcharacter is calculated for every certain time (frame). Realisticmovement of the leader-included group can be shown while changing itsposition in the group without disturbing the formation.

Incidentally, in the movement of the leader-including group, the leadercharacter is positioned generally in the middle of the group. There maybe a method to change the leader character in addition to changing ofthe character at the top of the group, when the character at the top ismoved sidewardly as the leader character.

However, it is assumed that, in this embodiment, a particular leadercharacter commands the agent characters (soldiers) to move or fight as agroup. Therefore it is not assumed that the leader character is changeddepending on the state of the leader-including group (troop).Accordingly, the leader character is not changed in view of the idea ofthe barycenter if the leader character is positioned generally in themiddle of the group.

Also, at the beginning or in the course of the battle of theleader-including group, there is formed the front line by the fightingcharacters. The left analogue stick 50 (or the cross-shaped button set36) is tilted upwardly to start moving the leader-including groupupwardly. The battle starts when encountering the enemy group. As longas the left analogue stick 50 is tilted upwardly, the characterscontinue the battle. At this time, the non-displayed front line isformed by the fighting agent character (front-line soldiers) so as topass the enemy group. In contrast, the group starts to retreat when theleft analogue stick 50 is tilted downwardly. It is a normal process fora one-on-one fight, but it is a complicated process for the group fight.

Further, after the leader-including group is piercing the enemy group,the friendly agents who are not fighting can be operated. If theleader-including group is not fighting, the rear agent characters(rear-guarding soldiers) are standing by for assistance whilemaintaining the formation (so as to avoid piercing of the enemycharacter) and are able to move behind the enemy group upon theoperation of the input device 10.

There is provided the virtual borderline behind and adjacent the enemygroup. When the player operates the left analogue stick 50, the friendlyagents who are not fighting move beyond the borderline and moveautomatically behind the enemy group for surround.

Also, in the battle after the movement of the leader-including group,the leader character searches for the enemy (who are not fighting inview so as to move close to them for the fight), similarly to the otherfriendly agent characters.

It is noted that in the present invention, the leader character can bepositioned in the rear of the agent group.

1. A program for controlling video games, controlling the movement of acharacter group to permit a computer to function as: a group movementmeans to move a leader-including group of which a leader character isadded to an agent group comprising a plurality of agent characters in a3-dimensional virtual space based on input information from an inputdevice; a particular effect means to effect a particular force on eachcharacter every certain time in order to express the realistic movementof the character when moving the leader-including group; a positioncomputing and storage means to calculate and memorize the latestposition of each character based on the applied particular effects; anda group display means to display the leader-including group on a displaydevice.
 2. The program for controlling the movement of a character groupas defined in claim 1, wherein the particular force effected on eachcharacter includes repulsive force, cohesive force, and moving force. 3.The program for controlling the movement of a character group as definedin claim 1 to permit the computer to further function as a leadermovement means to move the leader character to the barycenter of theagent group.
 4. A recorded medium on which the programs as defined inclaims 1 are recorded and from which the computer can read.
 5. A gamedevice to operate the video game, comprising: a group movement means tomove a leader-including group of which a leader character is added to anagent group comprising a plurality of agent characters in a3-dimensional virtual space based on input information from an inputdevice; a particular force effect means to effect the particular forceon each character every certain time in order to express the realisticmovement of the character when moving the leader-including group; aposition computing and storage means to calculate and memorize thelatest position of each character based on the applied particulareffects; and a group display means to display the leader-including groupon a display device.
 6. A program for controlling video games, andcontrolling the movement of a character group to permit a computer tofunction as: a group movement and combat means to move, to an enemy areafor a battle, a leader-including group of which a leader character isadded to an agent group comprising a plurality of agent characters in a3-dimensional virtual space based on input information from an inputdevice; a front-line forming means to form the front-line of theleader-including so as not to pass an enemy group in the battle of theleader-including group against the enemy group; and a friendly and enemygroups display means to display the leader-including and the enemygroups on a display device.
 7. The program for controlling the movementof a character group as defined in claim 6 to permit the computer tofurther function as a friendly agent movement means to move the friendlyagent who is not fighting based on information from the input deviceafter the leader-including group is piercing the enemy group.
 8. Theprogram for controlling the movement of a character group as defined inclaim 7 to permit the computer to further function as a friendly agentmove-around means to automatically move the friendly agent who is notfighting to surround behind the enemy group when the friendly agent goesbeyond a set virtual border line at the back of the enemy group.
 9. Theprogram for controlling the movement of a character group as defined inclaim 6 to permit the computer to further function as a reconnoitermeans to enable the leader character to search for the enemy as in theother friendly agent character in the course of battle of theleader-included group.
 10. A recorded medium on which the programs asdefined in claims 6 are recorded and from which the computer can read.11. A game device to operate the video game, comprising: a groupmovement and combat means to move, to an enemy area for a battle, aleader-including group of which a leader character is added to an agentgroup comprising a plurality of agent characters in a 3-dimensionalvirtual space based on input information from an input device; afront-line forming means to form the front-line of the leader-includingso as not to pass an enemy group in the battle of the leader-includinggroup against the enemy group; a friendly agent movement means to movethe friendly agent who is not fighting after the leader-including groupis piercing the enemy group; a friendly agent move-around means toautomatically move the friendly agent who is not fighting to surroundbehind the enemy group when the friendly agent who is not fighting goesbeyond a set virtual border line at the back of the enemy group; and afriend and enemy groups display means to display the leader-includinggroup and the enemy group on a display device.